Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Remove drafts silliness from examples #1785

Merged
merged 18 commits into from
Jan 31, 2022

Conversation

siddharthkp
Copy link
Member

@siddharthkp siddharthkp commented Jan 11, 2022

Checklist:


Problem:

Because drafts is scoped, we have some implementation detail silliness in the examples:

before:

docs implementation silliness

 

Solution: By making live-code-scope accept a function (doctocat/332), we can make scope dynamic based on metastring:

- ```javascript live
+ ```jsx live drafts

after, so clean, yay:

no silliness

@siddharthkp siddharthkp requested review from a team and colebemis January 11, 2022 13:07
@changeset-bot
Copy link

changeset-bot bot commented Jan 11, 2022

⚠️ No Changeset found

Latest commit: 0c93480

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@siddharthkp siddharthkp temporarily deployed to visual-testing January 11, 2022 13:07 Inactive
@siddharthkp siddharthkp added docs Documentation react skip changeset This change does not need a changelog labels Jan 11, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jan 11, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 61.34 KB (0%)
dist/browser.umd.js 61.71 KB (0%)

@siddharthkp siddharthkp self-assigned this Jan 11, 2022
@siddharthkp siddharthkp changed the title Docs: Make live-code scope dynamic for drafts Docs: Make drafts examples clean Jan 11, 2022
@siddharthkp siddharthkp changed the title Docs: Make drafts examples clean Docs: Remove drafts silliness from examples Jan 11, 2022
@@ -12,7 +12,7 @@
"node": ">= 10.x"
},
"dependencies": {
"@primer/gatsby-theme-doctocat": "^3.1.0",
"@primer/gatsby-theme-doctocat": "0.0.0-2022011123325",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval assumes this will be updated after your doctocat PR merges

@@ -130,7 +130,8 @@
"jsx-a11y/label-has-for": 0,
"@typescript-eslint/no-unnecessary-condition": 0,
"@typescript-eslint/no-unused-vars": 0,
"primer-react/no-deprecated-colors": ["error", {"skipImportCheck": true}]
"primer-react/no-deprecated-colors": ["error", {"skipImportCheck": true}],
"no-redeclare": 0
Copy link
Member Author

@siddharthkp siddharthkp Jan 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this for code blocks so that we can write this block ⬇️ without adding a // eslint-ignore inside the code block

// ESM
import {ActionList} from '@primer/react/lib-esm/drafts'
// or commonjs:
import {ActionList} from '@primer/react/lib/drafts'

@siddharthkp siddharthkp requested a review from rezrah January 14, 2022 10:46
@siddharthkp
Copy link
Member Author

Update: Brought in changes from #1778 to this PR

@siddharthkp
Copy link
Member Author

@colebemis I think we're ready here!

@siddharthkp siddharthkp merged commit 5e4b60c into main Jan 31, 2022
@siddharthkp siddharthkp deleted the siddharth/docs-dynamic-drafts-scope branch January 31, 2022 13:13
@siddharthkp
Copy link
Member Author

Talked to @pksjce about #1771. There will be be some more improvements after that PR is merged 🎉 Until then, this is a step in the right direction, so merged :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation react skip changeset This change does not need a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple Alpha components can't be used despite being available in the documentation.
3 participants